package stack.era.presentation.frame;

import stack.era.domain.DomainController;

public class ERAFramePopulateThread extends Thread {

	private boolean done;

	public ERAFramePopulateThread() {
		this.done = false;
	}

	@Override
	public void run() {
		while (!done) {
			DomainController.getInstance().updateDomain();
			ERAFrame.getInstance().populatePresentation();
			try {
				Thread.sleep(100);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}

	public void end() {
		done = true;
	}

}
